<%@ page language="java" contentType="text/html;charset=utf-8" pageEncoding="utf-8"%>

<%@ include file="/core/taglibs.jsp"%>
<!DOCTYPE html>
<html lang="zh-CN">
  
<head>
 	<%@ include file="/core/memberMeta.jsp"%>
 	<script src="<%=basePath%>/resources/memberCss/assets/js/jquery-1.10.2.min.js"></script>
	<script type="text/javascript"> 
		$(function() {
		    $('#submit').click(function() {
		    	var checkSubmitFlg = true; 
		    
		    	if(checkSubmitFlg==true){
		    		
		    		var this_ = this;
			    	this_.setAttribute("disabled", true);  
			    	this_.value="请稍等，提交中...";  
			        $.ajax({
			            url: '<%=basePath%>/member/wealth/moneyZhuanOther.shtml',
			            type: 'post',
			            dataType:'json',
			            data: $("#commitForm").serializeArray(),
			            success: function(result) {
			            	 if(result.success==true){
			            	 	 alert("恭喜您，转换成功。");
			            	 	
			            	 	 if($("#payType").val() ==20){
			            	 		 window.location.href="<%=basePath%>/member/wealth/logEleList.shtml"; 	
			            	 	 }
			            	 	 
			            	 	 if($("#payType").val() ==30){
			            	 		 window.location.href="<%=basePath%>/member/wealth/logChuangyeList.shtml"; 	
			            	 	 }
			            	 	 
			            		 
			            	 }else{
			            	 	 alert("转换失败。"+result.msg);
			            	 	 location.reload();//刷新页面   
			            	 }
			            	 
			            	 //放到回调里
			            	 this_.removeAttribute("disabled"); 
			        		 this_.value="提  交";  
			            }
			        });
			        
			        
            	 	 
		    	}
		    	
		    });
		});
	</script>
</head>


<body>
	<script src="<%=basePath%>/resources/memberCss2/assets/js/theme.js"></script>
	<div class="page-heading">
		<h3>资金管理</h3>
		<ul class="breadcrumb">
			<li>资金管理</li>
			<li class="active">现金积分转账</li>
		</ul>
	</div>
	<section class="wrapper">
		<div class="row">
			<div class="col-lg-12">
				<section class="panel">
					<header class="panel-heading">现金积分转账</header>
					<div class="panel-body">
						<form class="form-horizontal adminex-form"  method="post"  id="commitForm" >
							<input type="hidden" name="token" value="${token}" />
							<jodd:form scopes="request" beans="member">
								<div class="form-group">
									<label class="col-sm-2 col-sm-2 control-label">我的现金积分：</label>
									<div class="col-sm-10">
										${member.money}
									</div>
								</div>
								<div class="form-group">
									<label class="col-sm-2 col-sm-2 control-label">我的购物积分：</label>
									<div class="col-sm-10">
										${member.ele}
									</div>
								</div>
								<div class="form-group">
									<label class="col-sm-2 col-sm-2 control-label">我的重消：</label>
									<div class="col-sm-10">
										${member.chuangye}
									</div>
								</div>
								<div class="form-group">
									<label class="col-sm-2 col-sm-2 control-label">转换积分种：</label>
									<div class="col-sm-10">
										<select class="form-control" id="payType" name="payType">
											<option value="20">购物积分</option>
											<option value="30">重消</option>
									</select>
									</div>
								</div>
								<div class="form-group">
									<label class="col-sm-2 col-sm-2 control-label">请输入要转的数量：</label>
									<div class="col-sm-10">
										<input type="text"  id="num" name="num"   placeholder="请输入转换数量" class="form-control m-bot15" />
									</div>
								</div>

								<div class="form-group">
									<label class="col-sm-2 col-sm-2 control-label">安全密码：</label>
									<div class="col-sm-10">
										<input type="password" id="myTwoPassword" name="myTwoPassword" class="form-control m-bot15"/>
									</div>
								</div>

								<div class="form-group text-center">${retMsg}</div>

								<div class="form-group text-center">
									<button type="button" id="submit" name="submit" class="btn btn-primary">提交</button>
								</div>

							</jodd:form>
						</form>
					</div>
				</section>
			</div>
		</div>
	</section>
	<script src="<%=basePath%>/resources/memberCss2/assets/js/amazeui2.min.js"></script>
	<script src="<%=basePath%>/resources/memberCss2/assets/js/amazeui.datatables.min.js"></script>
	<script src="<%=basePath%>/resources/memberCss2/assets/js/dataTables.responsive.min.js"></script>
	<script src="<%=basePath%>/resources/memberCss2/assets/js/app.js"></script>
</body>

</html>





